class ControllerMethodResolver
extends java.lang.Object
RequestMappingHandlerAdapter
with
resolving, initializing, and caching annotated methods declared in
@Controller
and @ControllerAdvice
components:
@InitBinder
@ModelAttribute
@RequestMapping
@ExceptionHandler
Constructor and Description |
---|
ControllerMethodResolver(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context,
java.util.List<HttpMessageReader<?>> readers) |
Modifier and Type | Method and Description |
---|---|
private InvocableHandlerMethod |
createAttributeMethod(java.lang.Object bean,
java.lang.reflect.Method method) |
private static java.util.List<HandlerMethodArgumentResolver> |
exceptionHandlerResolvers(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context) |
InvocableHandlerMethod |
getExceptionHandlerMethod(java.lang.Throwable ex,
HandlerMethod handlerMethod)
Find an
@ExceptionHandler method in @ControllerAdvice
components or in the controller of the given @RequestMapping method. |
private SyncInvocableHandlerMethod |
getInitBinderMethod(java.lang.Object bean,
java.lang.reflect.Method method) |
java.util.List<SyncInvocableHandlerMethod> |
getInitBinderMethods(HandlerMethod handlerMethod)
Find
@InitBinder methods in @ControllerAdvice components
or in the controller of the given @RequestMapping method. |
java.util.List<InvocableHandlerMethod> |
getModelAttributeMethods(HandlerMethod handlerMethod)
Find
@ModelAttribute methods in @ControllerAdvice
components or in the controller of the given @RequestMapping method. |
InvocableHandlerMethod |
getRequestMappingMethod(HandlerMethod handlerMethod)
Return an
InvocableHandlerMethod for the given
@RequestMapping method initialized with argument resolvers. |
SessionAttributesHandler |
getSessionAttributesHandler(HandlerMethod handlerMethod)
Return the handler for the type-level
@SessionAttributes annotation
based on the given controller method. |
private java.util.List<SyncHandlerMethodArgumentResolver> |
initBinderResolvers(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context) |
private void |
initControllerAdviceCaches(ApplicationContext applicationContext) |
private static java.util.List<HandlerMethodArgumentResolver> |
initResolvers(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context,
boolean supportDataBinding,
java.util.List<HttpMessageReader<?>> readers) |
private static java.util.List<HandlerMethodArgumentResolver> |
modelMethodResolvers(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context) |
private static java.util.List<HandlerMethodArgumentResolver> |
requestMappingResolvers(ArgumentResolverConfigurer customResolvers,
ReactiveAdapterRegistry reactiveRegistry,
ConfigurableApplicationContext context,
java.util.List<HttpMessageReader<?>> readers) |
private static Log logger
private final java.util.List<SyncHandlerMethodArgumentResolver> initBinderResolvers
private final java.util.List<HandlerMethodArgumentResolver> modelAttributeResolvers
private final java.util.List<HandlerMethodArgumentResolver> requestMappingResolvers
private final java.util.List<HandlerMethodArgumentResolver> exceptionHandlerResolvers
private final ReactiveAdapterRegistry reactiveAdapterRegistry
private final java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.reflect.Method>> initBinderMethodCache
private final java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.reflect.Method>> modelAttributeMethodCache
private final java.util.Map<java.lang.Class<?>,ExceptionHandlerMethodResolver> exceptionHandlerCache
private final java.util.Map<ControllerAdviceBean,java.util.Set<java.lang.reflect.Method>> initBinderAdviceCache
private final java.util.Map<ControllerAdviceBean,java.util.Set<java.lang.reflect.Method>> modelAttributeAdviceCache
private final java.util.Map<ControllerAdviceBean,ExceptionHandlerMethodResolver> exceptionHandlerAdviceCache
private final java.util.Map<java.lang.Class<?>,SessionAttributesHandler> sessionAttributesHandlerCache
private static final ReflectionUtils.MethodFilter BINDER_METHODS
@InitBinder
methods.private static final ReflectionUtils.MethodFilter ATTRIBUTE_METHODS
@ModelAttribute
methods.ControllerMethodResolver(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context, java.util.List<HttpMessageReader<?>> readers)
private java.util.List<SyncHandlerMethodArgumentResolver> initBinderResolvers(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context)
private static java.util.List<HandlerMethodArgumentResolver> modelMethodResolvers(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context)
private static java.util.List<HandlerMethodArgumentResolver> requestMappingResolvers(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context, java.util.List<HttpMessageReader<?>> readers)
private static java.util.List<HandlerMethodArgumentResolver> exceptionHandlerResolvers(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context)
private static java.util.List<HandlerMethodArgumentResolver> initResolvers(ArgumentResolverConfigurer customResolvers, ReactiveAdapterRegistry reactiveRegistry, ConfigurableApplicationContext context, boolean supportDataBinding, java.util.List<HttpMessageReader<?>> readers)
private void initControllerAdviceCaches(ApplicationContext applicationContext)
public InvocableHandlerMethod getRequestMappingMethod(HandlerMethod handlerMethod)
InvocableHandlerMethod
for the given
@RequestMapping
method initialized with argument resolvers.public java.util.List<SyncInvocableHandlerMethod> getInitBinderMethods(HandlerMethod handlerMethod)
@InitBinder
methods in @ControllerAdvice
components
or in the controller of the given @RequestMapping
method.private SyncInvocableHandlerMethod getInitBinderMethod(java.lang.Object bean, java.lang.reflect.Method method)
public java.util.List<InvocableHandlerMethod> getModelAttributeMethods(HandlerMethod handlerMethod)
@ModelAttribute
methods in @ControllerAdvice
components or in the controller of the given @RequestMapping
method.private InvocableHandlerMethod createAttributeMethod(java.lang.Object bean, java.lang.reflect.Method method)
@Nullable public InvocableHandlerMethod getExceptionHandlerMethod(java.lang.Throwable ex, HandlerMethod handlerMethod)
@ExceptionHandler
method in @ControllerAdvice
components or in the controller of the given @RequestMapping
method.public SessionAttributesHandler getSessionAttributesHandler(HandlerMethod handlerMethod)
@SessionAttributes
annotation
based on the given controller method.